package com.bruce.algorithm.sort.sortpractice;

import java.util.Arrays;

public class SortTest {
    public static void main(String[] args) {
        String[] array = new String[]{"D","a","F","B","c","A","z"};
        sort(array);
        System.out.println(Arrays.toString(array));
    }
    private static void sort(String[] a){
        int len = a.length;
        if(a.length<=1){
            return;
        }
        int pointer = 0;
        for(int i=0;i<len;i++){
            String ss = a[i];
            char c = a[i].charAt(0);
            if(Character.isLowerCase(c)){
                String tmp = a[pointer];
                a[pointer] = a[i];
                a[i] = tmp;
                pointer++;
            }
        }
    }
    private void sort2(String[] a){
        int len = a.length;
        if(len<=1){
            return;
        }
        String[] num = new String[len];
        String[] lower = new String[len];
        String[] upper = new String[len];
        for(int i=0;i<len;i++){
            String ss = a[i];
            if(check(ss)==1){

            }
        }
    }

    private static int check(String ss){
      if(Character.isUpperCase(ss.charAt(0))){
          return 1;
      }else if(Character.isLowerCase(ss.charAt(0))){
          return 2;
      }else if(Character.isDigit(ss.charAt(0))){
          return 3;
      }
      return 0;
    }
}
